<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<#include "lib/lib.html" />
<title>赞助商接口配置管理</title>
</head>
<body>
	<nav class="breadcrumb">
	 	 <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 系统管理 <span class="c-gray en">&gt;</span><A href="#" > 赞助商接口配置管理</A>
		 <a  class="btn btn-success radius r mr-20"  style="line-height: 1.6em; margin-top: 3px" href="javascript:location.replace(location.href);" title="刷新">
		 <i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="pd-20 text-c">
		<div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="l">
				<a class="btn btn-primary radius" onclick="sysDic_add('添加赞助商接口信息','${basePath}/sysCom/addOrUpdate.do',600,500)" href="javascript:;">
				<i class="Hui-iconfont">&#xe600;</i> 添加赞助商接口信息</a></span> <span class="r"> 
			</span>
		</div>
		<div class="mt-20">
			<div id="page" class="holder"></div>  
			<table class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th width="25">序号</th>
						<th width="150">赞助商名称</th>
						<th width="180">赞助商理财查询URL</th>
						<th width="180">赞助商任务查询URL</th>
						<th width="200">赞助商token</th>
						<th width="200">赞助商code</th>
						<th width="300">操作</th>
					</tr>
				</thead>
				<tbody>
					<#if dicList.dataList?? && dicList.dataList?size gt 0>
					<#list dicList.dataList as dl >
						<tr class="text-c">
							<td>${dl_index+1}</td>
							<td>${dl.sponsorName!}</td>
							<td><p style="width:180px;">${dl.url!}</p></td>
							<td><p style="width:180px;">${dl.taskUrl!}</p></td>
							<td>${dl.token!}</td>
							<td>${dl.sponsorCode!}</td>
							<td class="td-manage">
								<a title="编辑" href="javascript:;" onclick="sysDic_edit('赞助商接口信息编辑','${basePath}/sysCom/addOrUpdate.do?id=${dl.id!}','600','500')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a> 
								<a title="删除" href="javascript:;" onclick="sysDic_del(this,${dl.id!})" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
								<a title="查看任务记录" href="javascript:;" onclick="view_task('查看任务记录','${basePath}/Wmpchecking/taskList.do?sponsorCode=${dl.sponsorCode!}','','')" class="ml-5" style="text-decoration:none"><span class="label label-success radius">查看任务记录</span></a>
								<a title="查看理财记录" href="javascript:;" onclick="view_wmp('查看理财记录','${basePath}/Wmpchecking/wmpList.do?sponsorCode=${dl.sponsorCode!}','','')" class="ml-5" style="text-decoration:none"><span class="label label-success radius">查看理财记录</span></a>
							</td>
						</tr>
					</#list>
					</#if>
				</tbody>
			</table>
			</br>
			<div class="page_list"></div>
		</div>
	</div>
	<script type="text/javascript">
	
	
	$(function(){
	 	laypage({
	 	    cont: $('.page_list'), //容器。值支持id名、原生dom对象，jquery对象,
		    pages: ${dicList.endPage! }, //总页数
	 	    //skip: true, //是否开启跳页
// 	    	skin: 'molv',
	 	    groups: 10, //连续显示分页数
	 	    first: '首页', //若不显示，设置false即可
	 	    last: '尾页', //若不显示，设置false即可
	 	    curr:${dicList.curPage!},
	 	   	hash: true, //开启hash
	 	    skin: '#241a08',
	 	    jump: function(obj,first){ //触发分页后的回调
// 	 	       $('.view').html('目前正在第'+ obj.curr +'页，一共有：'+ obj.pages +'页');
	 	    	if(!first){
	 	         	 window.location.href="${basePath}/sysCom/comInterfaceList.do?curPage="+obj.curr +"&pageData="+10;
	 	    	}
	 	    }
	 	});
	 			
	});
	
	//sysDic_role('查看字典','${basePath}/sysDic/toadminrole.do?id=${dl.id!}&userName=${dl.admName}','1')
		/*系统-字典-添加*/
		function sysDic_add(title, url, w, h) {
			layer_show(title, url, w, h);
		}
		
		/*系统-字典-编辑*/
		function sysDic_edit(title, url, w, h) {
			layer_show(title, url, w, h);
		}
		/*查询任务列表*/
		function view_task(title, url, w, h) {
			layer_show(title, url, w, h);
		}
		/*查询理财列表*/
		function view_wmp(title, url, w, h) {
			w=1200
			layer_show(title, url, w, h);
		}
		/*系统-字典-删除*/
		function sysDic_del(obj, id) {
			layer.confirm('确认要删除吗？', function(index) {
				var data = {};
				data.id = id;
				//后台请求保存数据
				$.axse("${basePath}/sysCom/delCom.do",  data, function(d){
					if(d.resultCode == 200){
						$(obj).parents("tr").remove();
						layer.msg('已删除!', {
							icon : 1,
							time : 1000
						});
					}else{
						layer.msg('删除失败,请重试!', {
							icon : 1,
							time : 1000
						});
					}
				},
				function(d){
					layer.msg('删除失败,请重试!', {
						icon : 1,
						time : 1000
					});
				});
			});
		}
		
		
	
	</script>
</body>
</html>